package org.indi.graduatemanagement.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author zcl
 * @since 2021-05-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Grades implements Serializable {

    private static final long serialVersionUID = 1L;

    public Grades() {
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @NotBlank(message = "科目名称不能为空")
    private String gradesKey;

    @NotBlank(message = "学号不能为空")
    @TableField("graduates_ID")
    private String graduatesId;

    @NotNull(message = "科目成绩不能为空")
    private Integer gradesValue;

}
